unit fSelectCustomer;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, StdCtrls, ExtCtrls,
  uCommonclass, DB, DBClient;

type
  TfrmSelectCustomer = class(TForm)
    dxdbgrdCustomer: TdxDBGrid;
    dxdbgrdclmnEnterpriseNum: TdxDBGridColumn;
    dxdbgrdclmnEnterpriseSimpleNum: TdxDBGridColumn;
    dxdbgrdclmnCustomerSimpleName: TdxDBGridColumn;
    dxdbgrdclmnCustomerName: TdxDBGridColumn;
    cds1: TClientDataSet;
    ds1: TDataSource;
    dxdbgrdclmnIndustry: TdxDBGridColumn;
    dxdbgrdclmnIndustryDetail: TdxDBGridColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure dxdbgrdCustomerDblClick(Sender: TObject);
  private
    { Private declarations }
    gDBSuperMan: TDBSuperMan;
  public
    { Public declarations }
  end;

var
  frmSelectCustomer: TfrmSelectCustomer;

implementation

{$R *.dfm}

procedure TfrmSelectCustomer.FormCreate(Sender: TObject);
begin
  gDBSuperMan := TDBInquireSuperMan.Create;
end;

procedure TfrmSelectCustomer.FormShow(Sender: TObject);
begin
  gDBSuperMan.Table := 'BI_Customer';
  gDBSuperMan.DBGrid := dxdbgrdCustomer;
  gDBSuperMan.FieldsPanel := nil;
  gDBSuperMan.PrepareData;
  gDBSuperMan.ExecuteOperate;
end;

procedure TfrmSelectCustomer.dxdbgrdCustomerDblClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

end.
